package com.shujia.scala

object Demo19Tuple {

  def main(args: Array[String]): Unit = {


    /**
      * 元组
      *
      */


    //定义元组
    val t = (1, 2, 3, 4, 5, 6)

    //可以直接通过下划线获取数据
    println(t._6)

    val t1 = (1, 2)
    println(t1._1)


    val tuple = Tuple5(1, 2, 3, 4, 5)
    println(tuple)


  }

}
